package com.ruoyi.common.base.enums;


import com.ruoyi.common.base.vo.ComKeyValueVo;

import java.util.ArrayList;
import java.util.List;

/**
 * 宏观煤岩成分枚举
 *
 * @author gu
 */
public enum MacroscopicCoalEnum {
    VITRAIN("1", "镜煤"),//200
    CLARAIN("2", "亮煤"),//100
    DURAIN("3", "暗煤"),//300
    FUSITE("4", "丝炭");
    private final String code;
    private final String type;

    MacroscopicCoalEnum(String code, String type) {
        this.code = code;
        this.type = type;
    }

    public static List<ComKeyValueVo> getArmTypeEnumList() {
        ArrayList<ComKeyValueVo> armTypeEnumList = new ArrayList<>();
        for (MacroscopicCoalEnum armTypeEnum : MacroscopicCoalEnum.values()) {
            ComKeyValueVo armTypeEnumVo = new ComKeyValueVo();
            armTypeEnumVo.setKey(armTypeEnum.code);
            armTypeEnumVo.setValue(armTypeEnum.type);
            armTypeEnumList.add(armTypeEnumVo);
        }
        return armTypeEnumList;
    }

    public String getCode() {
        return code;
    }

    public String getType() {
        return type;
    }
}
